package com.cdtye.itps.cms.service.direction;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cdtye.common.mybatiscore.base.BaseService;
import com.cdtye.itps.cms.dao.direction.entity.JcDirection;
import com.cdtye.itps.cms.dao.direction.vo.JcDirectionVo;
import com.cdtye.itps.cms.mapper.direction.JcDirectionMapper;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Api("行别 服务")
@Service
@Slf4j
public class JcDirectionService extends BaseService<JcDirectionMapper, JcDirection> {

    /**
     * 获取全部行别
     * @return
     */
    public List<JcDirection> findAll(){
        return baseMapper.findAll();
    }

    /**
     * 分页查询
     */
    public IPage<Map<String,Object>> findPage(JcDirectionVo vo){
        return baseMapper.pageList(vo.page(),vo);
    }

    /**
     * 列表获取
     */
    public List<Map<String,Object>> getList(JcDirectionVo vo){
        return baseMapper.getList(vo);
    }

    public IPage<Map<String, Object>> pageList4Brain(JcDirectionVo vo) {
        return baseMapper.pageList4Brain(vo.page(),vo);
    }
}
